package net.xdclass.product_server.control;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import net.xdclass.product_server.service.ProductService;

@RestController
@RequestMapping("/api/v1/product")
public class ProductController {

	@Autowired
	private ProductService productService;
	
	
	@RequestMapping("/list")
	public Object list() {
		return productService.listProduct();
	}
	
	
	@RequestMapping("/find")
	public Object findById(int id) {
		return productService.findById(id);
	}
	
}
